package com.sdjenkins.sms;

import java.text.SimpleDateFormat;

public class WASms implements SmsCore {

	private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HHmmss");
	private short type;
	private String body;
	private String address;
	private String when;

	public long getDate() {
		long date = 0;
		if(when != null) {
			try {date = sdf.parse(when).getTime();}
			catch (Exception e) {throw new RuntimeException();};
		}
		return date;
	}
	@Override
	public short getType() {
		return type;
	}
	@Override
	public String getAddress() {
		return address;
	}
	@Override
	public String getBody() {
		return body;
	}

}
